package com.hsmpay.mobile.service.user;

import com.hsmpay.common.service.BaseService;
import com.hsmpay.mobile.pojo.user.UserMoney;

import java.io.Serializable;

/**
 * 用户虚拟货币 服务接口 userMoneyService
 *
 * @param <Entity>
 * @param <Query>
 * @author 颜铃璋
 *         建立时间：2013-1-24
 */
public interface UserMoneyService<Entity extends Serializable, Query extends Object> extends BaseService<Entity, Query> {
    /**
     * 通过userId 查询用户虚拟货币
     *
     * @param userId
     * @return
     * @throws Exception
     */
    public UserMoney searchUserMoneyByUserId(Long userId) throws Exception;

    /**
     * 金额是否足够
     *
     * @param userId
     * @param money
     * @param type
     * @return
     * @throws Exception
     */
    public boolean moneyTheAdequacy(Long userId, Double money, int type) throws Exception;


}
